import { createApp } from "vue";
import App from "./App.vue";
const app = createApp(App);

// Pinia 存储库 (https://pinia.web3doc.top/)
import { createPinia } from "pinia";
app.use(createPinia());

// 路由 (https://router.vuejs.org/zh/)
import router from "./router";
app.use(router);

// 自定义组件
import richText from "@/components/RichText/index.vue";
app.component("rich-text", richText);

// 自定义指令
import { directives } from "@/utils/directives";
Object.entries(directives).forEach(([name, directive]) => {
  app.directive(name, directive);
});

app.mount("#app");
